/**
 * 
 */
package com.gf.pf.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gf.pf.dao.MyBatisDao;
import com.gf.pf.service.MyBatisService;

/**
 * @description MyBatisDao基于xml的ServiceImpl
 * @date   Mar 9, 2015
 */
@Service
@Transactional
public class MyBatisServiceImpl implements MyBatisService {

	@Autowired
	private MyBatisDao myBatisDao;
	
	/* (non-Javadoc)
	 * @see com.gf.pf.service.MyBatisService#insert(java.lang.String, java.lang.Object)
	 * 保存
	 */
	@Override
	public int insert(String key, Object object) {
		return myBatisDao.insert(key, object);
	}

	/* (non-Javadoc)
	 * @see com.gf.pf.service.MyBatisService#delete(java.lang.String, java.lang.Object)
	 * 删除
	 */
	@Override
	public int delete(String key, Object object) {
		return myBatisDao.delete(key, object);
	}

	/* (non-Javadoc)
	 * @see com.gf.pf.service.MyBatisService#update(java.lang.String, java.lang.Object)
	 * 修改
	 */
	@Override
	public int update(String key, Object object) {
		return myBatisDao.update(key, object);
	}

	/* (non-Javadoc)
	 * @see com.gf.pf.service.MyBatisService#get(java.lang.String, java.lang.Object)
	 * 获得对象
	 */
	@Override
	public Object get(String key, Object object) {
		return myBatisDao.get(key, object);
	}

	/* (non-Javadoc)
	 * @see com.gf.pf.service.MyBatisService#count(java.lang.String, java.lang.Object)
	 * 总记录数
	 */
	@Override
	public int count(String key, Object object) {
		return myBatisDao.count(key, object);
	}

	/* (non-Javadoc)
	 * @see com.gf.pf.service.MyBatisService#getList(java.lang.String)
	 * 对象列表
	 */
	@Override
	public List<?> getList(String key) {
		return myBatisDao.getList(key);
	}

	/* (non-Javadoc)
	 * @see com.gf.pf.service.MyBatisService#getList(java.lang.String, java.lang.Object)
	 * 带参数的对象列表
	 */
	@Override
	public List<?> getList(String key, Object object) {
		return myBatisDao.getList(key, object);
	}

	/* (non-Javadoc)
	 * @see com.gf.pf.service.MyBatisService#batchInsert(java.lang.String, java.util.List)
	 * 批量插入
	 */
	@Override
	public boolean batchInsert(String key, List<?> objList) {
		return myBatisDao.batchInsert(key, objList);
	}

}
